//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.ruoyi.web.controller.app;

import com.ruoyi.live.app.service.CacheService;
import com.ruoyi.live.tool.utils.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller("systemCacheController")
@RequestMapping({"/cache"})
public class CacheController {
    @Autowired
    CacheService service;

    public CacheController() {
    }

    @ResponseBody
    @RequestMapping({"/clearBarrage"})
    public Message evictBarrageCache() {
        try {
            this.service.evictCBarrageCache();
            this.service.evictQBarrageCache();
            this.service.evictBarrageCache();
            return new Message(true, "");
        } catch (Exception var2) {
            var2.printStackTrace();
            return new Message(false, "失败");
        }
    }

    @ResponseBody
    @RequestMapping({"clearAllCache"})
    public Message clearAll() {
        try {
            this.service.doEvit();
            return new Message(true, "");
        } catch (Exception var2) {
            var2.printStackTrace();
            return new Message(false, "失败");
        }
    }
}
